from django.contrib.auth.models import User
from django.db import models
from djangoProject.base.orm import engine


# Create your models here.
class UserProfile(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE)
    nickname = models.CharField(max_length=12)
    phone = models.CharField(max_length=11, verbose_name='电话号码', blank=False, null=False)
    def __str__(self):
        return f"{self.user.username}'s Profile"
